﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年2月26日
//类描述：实体类 Equip_Installed (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年2月26日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.PreAlarm.Model
{
    /// <summary>
    /// 实体类 Equip_Installed (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "Equip_Installed", PrimaryKey = "Equip_No", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class Equip_InstalledInfo : BaseModel
    {
        public Equip_InstalledInfo()
        {            
            PrimaryKey = "Equip_No"; 
			Fields.Add("Equip_No");//设备厂家编号
			Fields.Add("Equip_SimNo");//设备编号
			Fields.Add("Equip_City");//市
			Fields.Add("Equip_County");//县（区）
			Fields.Add("Equip_Town");//乡（镇、社区）
			Fields.Add("Equip_Village");//村（街道、单位）
			Fields.Add("Equip_Longitude");//经度
			Fields.Add("Equip_Latitude");//纬度
			Fields.Add("Equip_Class");//类型
			Fields.Add("Equip_SendMode");//发送方式
			Fields.Add("Equip_InstallDate");//安装时间
			Fields.Add("Factory_No");//设备厂家编号
			Fields.Add("Ext");//备用字段
			
			
			CanNotNullFields.Add("Equip_No");//设备厂家编号不能为空!				
			
			CanNotNullFields.Add("Equip_SimNo");//设备编号不能为空!				
			
			CanNotNullFields.Add("Equip_City");//市不能为空!				
			
			CanNotNullFields.Add("Equip_County");//县（区）不能为空!				
			
			CanNotNullFields.Add("Equip_Town");//乡（镇、社区）不能为空!				
			
			CanNotNullFields.Add("Equip_Village");//村（街道、单位）不能为空!				
			
			CanNotNullFields.Add("Equip_Longitude");//经度不能为空!				
			
			CanNotNullFields.Add("Equip_Latitude");//纬度不能为空!				
			
			CanNotNullFields.Add("Equip_Class");//类型不能为空!				
			
			CanNotNullFields.Add("Equip_SendMode");//发送方式不能为空!				
			
			CanNotNullFields.Add("Equip_InstallDate");//安装时间不能为空!				
			
			CanNotNullFields.Add("Factory_No");//设备厂家编号不能为空!				
			this.OnCreated();			
			this.OnModelCreated();
        }
		public Equip_InstalledInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
			
        }
        #endregion 
		
		#region 成员变量
				
		private string _Equip_No;//设备厂家编号
		private string _Equip_SimNo;//设备编号
		private string _Equip_City;//市
		private string _Equip_County;//县（区）
		private string _Equip_Town;//乡（镇、社区）
		private string _Equip_Village;//村（街道、单位）
		private decimal _Equip_Longitude;//经度
		private decimal _Equip_Latitude;//纬度
		private byte _Equip_Class;//类型
		private byte _Equip_SendMode;//发送方式
		private DateTime _Equip_InstallDate;//安装时间
		private string _Factory_No;//设备厂家编号
		private string _Ext;//备用字段
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// 设备厂家编号
        /// </summary>       
		[ModelField(Description = "设备厂家编号", Type = typeof(string), ErrorMessage = "设备厂家编号信息错误!", FieldType = FieldType.Normal, IsKeyField = true,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 32,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Equip_No
        {
            get
            {
                return this._Equip_No;
            }
            set
            {
                if (_Equip_No != value || (_Equip_No == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_No", _Equip_No, value, "varchar", "设备厂家编号");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_NoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_No = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_NoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_No = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 设备编号
        /// </summary>       
		[ModelField(Description = "设备编号", Type = typeof(string), ErrorMessage = "设备编号信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 11,  DbType = "char", IsNeedRecordModify = true)]
        public virtual string Equip_SimNo
        {
            get
            {
                return this._Equip_SimNo;
            }
            set
            {
                if (_Equip_SimNo != value || (_Equip_SimNo == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_SimNo", _Equip_SimNo, value, "char", "设备编号");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_SimNoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_SimNo = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_SimNoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_SimNo = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 市
        /// </summary>       
		[ModelField(Description = "市", Type = typeof(string), ErrorMessage = "市信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 16,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Equip_City
        {
            get
            {
                return this._Equip_City;
            }
            set
            {
                if (_Equip_City != value || (_Equip_City == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_City", _Equip_City, value, "varchar", "市");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_CityChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_City = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_CityChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_City = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 县（区）
        /// </summary>       
		[ModelField(Description = "县（区）", Type = typeof(string), ErrorMessage = "县（区）信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 16,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Equip_County
        {
            get
            {
                return this._Equip_County;
            }
            set
            {
                if (_Equip_County != value || (_Equip_County == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_County", _Equip_County, value, "varchar", "县（区）");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_CountyChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_County = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_CountyChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_County = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 乡（镇、社区）
        /// </summary>       
		[ModelField(Description = "乡（镇、社区）", Type = typeof(string), ErrorMessage = "乡（镇、社区）信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 16,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Equip_Town
        {
            get
            {
                return this._Equip_Town;
            }
            set
            {
                if (_Equip_Town != value || (_Equip_Town == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_Town", _Equip_Town, value, "varchar", "乡（镇、社区）");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_TownChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_Town = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_TownChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_Town = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 村（街道、单位）
        /// </summary>       
		[ModelField(Description = "村（街道、单位）", Type = typeof(string), ErrorMessage = "村（街道、单位）信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 16,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Equip_Village
        {
            get
            {
                return this._Equip_Village;
            }
            set
            {
                if (_Equip_Village != value || (_Equip_Village == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_Village", _Equip_Village, value, "varchar", "村（街道、单位）");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_VillageChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_Village = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_VillageChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_Village = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 经度
        /// </summary>       
		[ModelField(Description = "经度", Type = typeof(decimal), ErrorMessage = "经度信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 14,  DbType = "decimal", IsNeedRecordModify = true)]
        public virtual decimal Equip_Longitude
        {
            get
            {
                return this._Equip_Longitude;
            }
            set
            {
                if (_Equip_Longitude != value || (_Equip_Longitude == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_Longitude", _Equip_Longitude, value, "decimal", "经度");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_LongitudeChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_Longitude = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_LongitudeChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_Longitude = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 纬度
        /// </summary>       
		[ModelField(Description = "纬度", Type = typeof(decimal), ErrorMessage = "纬度信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 13,  DbType = "decimal", IsNeedRecordModify = true)]
        public virtual decimal Equip_Latitude
        {
            get
            {
                return this._Equip_Latitude;
            }
            set
            {
                if (_Equip_Latitude != value || (_Equip_Latitude == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_Latitude", _Equip_Latitude, value, "decimal", "纬度");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_LatitudeChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_Latitude = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_LatitudeChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_Latitude = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 类型
        /// </summary>       
		[ModelField(Description = "类型", Type = typeof(byte), ErrorMessage = "类型信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 1,  DbType = "tinyint", IsNeedRecordModify = true)]
        public virtual byte Equip_Class
        {
            get
            {
                return this._Equip_Class;
            }
            set
            {
                if (_Equip_Class != value || (_Equip_Class == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_Class", _Equip_Class, value, "tinyint", "类型");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_ClassChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_Class = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_ClassChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_Class = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 发送方式
        /// </summary>       
		[ModelField(Description = "发送方式", Type = typeof(byte), ErrorMessage = "发送方式信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 1,  DbType = "tinyint", IsNeedRecordModify = true)]
        public virtual byte Equip_SendMode
        {
            get
            {
                return this._Equip_SendMode;
            }
            set
            {
                if (_Equip_SendMode != value || (_Equip_SendMode == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_SendMode", _Equip_SendMode, value, "tinyint", "发送方式");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_SendModeChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_SendMode = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_SendModeChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_SendMode = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 安装时间
        /// </summary>       
		[ModelField(Description = "安装时间", Type = typeof(DateTime), ErrorMessage = "安装时间信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime Equip_InstallDate
        {
            get
            {
                return this._Equip_InstallDate;
            }
            set
            {
                if (_Equip_InstallDate != value || (_Equip_InstallDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Equip_InstallDate", _Equip_InstallDate, value, "datetime", "安装时间");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnEquip_InstallDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Equip_InstallDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnEquip_InstallDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Equip_InstallDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 设备厂家编号
        /// </summary>       
		[ModelField(Description = "设备厂家编号", Type = typeof(string), ErrorMessage = "设备厂家编号信息错误!", FieldType = FieldType.Normal, IsKeyField = true,IsUnique = false, IsForeignKey = true, IsAllowNull = false, IsDbGenerated = false, Size = 4,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Factory_No
        {
            get
            {
                return this._Factory_No;
            }
            set
            {
                if (_Factory_No != value || (_Factory_No == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Factory_No", _Factory_No, value, "varchar", "设备厂家编号");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnFactory_NoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Factory_No = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnFactory_NoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Factory_No = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 备用字段
        /// </summary>       
		[ModelField(Description = "备用字段", Type = typeof(string), ErrorMessage = "备用字段信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 64,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Ext
        {
            get
            {
                return this._Ext;
            }
            set
            {
                if (_Ext != value || (_Ext == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("Equip_Installed", "Ext", _Ext, value, "varchar", "备用字段");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnExtChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Ext = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnExtChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Ext = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnEquip_NoChanging(ModifyInfo modifyInfo);//设备厂家编号Equip_No改变之前发生
        partial void OnEquip_NoChanged(ModifyInfo modifyInfo);//设备厂家编号Equip_No改变之后发生
		partial void OnEquip_SimNoChanging(ModifyInfo modifyInfo);//设备编号Equip_SimNo改变之前发生
        partial void OnEquip_SimNoChanged(ModifyInfo modifyInfo);//设备编号Equip_SimNo改变之后发生
		partial void OnEquip_CityChanging(ModifyInfo modifyInfo);//市Equip_City改变之前发生
        partial void OnEquip_CityChanged(ModifyInfo modifyInfo);//市Equip_City改变之后发生
		partial void OnEquip_CountyChanging(ModifyInfo modifyInfo);//县（区）Equip_County改变之前发生
        partial void OnEquip_CountyChanged(ModifyInfo modifyInfo);//县（区）Equip_County改变之后发生
		partial void OnEquip_TownChanging(ModifyInfo modifyInfo);//乡（镇、社区）Equip_Town改变之前发生
        partial void OnEquip_TownChanged(ModifyInfo modifyInfo);//乡（镇、社区）Equip_Town改变之后发生
		partial void OnEquip_VillageChanging(ModifyInfo modifyInfo);//村（街道、单位）Equip_Village改变之前发生
        partial void OnEquip_VillageChanged(ModifyInfo modifyInfo);//村（街道、单位）Equip_Village改变之后发生
		partial void OnEquip_LongitudeChanging(ModifyInfo modifyInfo);//经度Equip_Longitude改变之前发生
        partial void OnEquip_LongitudeChanged(ModifyInfo modifyInfo);//经度Equip_Longitude改变之后发生
		partial void OnEquip_LatitudeChanging(ModifyInfo modifyInfo);//纬度Equip_Latitude改变之前发生
        partial void OnEquip_LatitudeChanged(ModifyInfo modifyInfo);//纬度Equip_Latitude改变之后发生
		partial void OnEquip_ClassChanging(ModifyInfo modifyInfo);//类型Equip_Class改变之前发生
        partial void OnEquip_ClassChanged(ModifyInfo modifyInfo);//类型Equip_Class改变之后发生
		partial void OnEquip_SendModeChanging(ModifyInfo modifyInfo);//发送方式Equip_SendMode改变之前发生
        partial void OnEquip_SendModeChanged(ModifyInfo modifyInfo);//发送方式Equip_SendMode改变之后发生
		partial void OnEquip_InstallDateChanging(ModifyInfo modifyInfo);//安装时间Equip_InstallDate改变之前发生
        partial void OnEquip_InstallDateChanged(ModifyInfo modifyInfo);//安装时间Equip_InstallDate改变之后发生
		partial void OnFactory_NoChanging(ModifyInfo modifyInfo);//设备厂家编号Factory_No改变之前发生
        partial void OnFactory_NoChanged(ModifyInfo modifyInfo);//设备厂家编号Factory_No改变之后发生
		partial void OnExtChanging(ModifyInfo modifyInfo);//备用字段Ext改变之前发生
        partial void OnExtChanged(ModifyInfo modifyInfo);//备用字段Ext改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("EquipInstalled", "Equip_No", Equip_No);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("EquipInstalled", "Equip_No", Equip_No);		
			ManageEditURI = ZModel.InitMEditURI("EquipInstalled", "Equip_No", Equip_No);	
		 	ManageDetailURI = ZModel.InitMDetailURI("EquipInstalled", "Equip_No", Equip_No);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}